﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/client/2007"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
  xmlns:common="clr-namespace:Microsoft.Windows.Controls.Samples;assembly=Microsoft.Windows.Controls.Samples.Common"
  xmlns:controls="clr-namespace:Microsoft.Windows.Controls;assembly=Microsoft.Windows.Controls"
  xmlns:basics="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
  xmlns:primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls">

    <!-- common:SampleBrowser -->
    <Style TargetType="common:SampleBrowser">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="common:SampleBrowser">
                    <Grid x:Name="Root" Background="Black">
                        <Grid.Resources>
                            <!--Common resources-->
                            <SolidColorBrush x:Key="TextBrush" Color="#FFFFFFFF" />
                            <Color x:Key="TextColor">#FFFFFFFF</Color>
                            <SolidColorBrush x:Key="NormalBrush" Color="#FF141726" />
                            <SolidColorBrush x:Key="NormalBorderBrush" Color="#FF333333" />
                            <SolidColorBrush x:Key="HoverBrush" Color="#FF393939" />
                            <SolidColorBrush x:Key="GlyphBrush" Color="#FFD1D1D1" />
                            <SolidColorBrush x:Key="ControlBackgroundBrush" Color="#FF1A1F3B" />
                            <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
                            <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#FF787878" />
                            <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
                            <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF595959" />
                            <LinearGradientBrush x:Key="SelectedBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FF909FF7" Offset="0.008"/>
                                <GradientStop Color="#FF1D2550" Offset="1"/>
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="ShineBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
                                <GradientStop Color="#59FFFFFF" Offset="0" />
                                <GradientStop Color="#00FFFFFF" Offset="1" />
                                <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                <GradientStop Color="#00FFFFFF" Offset="0.475" />
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="HoverShineBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
                                <GradientStop Color="#4CFFFFFF" Offset="0" />
                                <GradientStop Color="#26FFFFFF" Offset="1" />
                                <GradientStop Color="#26FFFFFF" Offset="0.467" />
                                <GradientStop Color="#00FFFFFF" Offset="0.475" />
                                <GradientStop Color="#00FFFFFF" Offset="0.856" />
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0">
                                <GradientStop Color="#444" Offset="0.0" />
                                <GradientStop Color="#888" Offset="1.0" />
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="PressedBrush" EndPoint="0.5,0.971" StartPoint="0.5,0.042">
                                <GradientStop Color="#4C000000" Offset="0" />
                                <GradientStop Color="#26FFFFFF" Offset="1" />
                                <GradientStop Color="#4C000000" Offset="0.467" />
                                <GradientStop Color="#26FFFFFF" Offset="0.479" />
                            </LinearGradientBrush>
                            <!--ScrollBar Style-->
                            <Style x:Key="ScrollBarStyle" TargetType="ScrollBar">
                                <Setter Property="MinWidth" Value="17" />
                                <Setter Property="MinHeight" Value="17" />
                                <Setter Property="IsTabStop" Value="False" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ScrollBar">
                                            <Grid x:Name="Root">
                                                <Grid.Resources>
                                                    <ControlTemplate x:Key="RepeatButtonTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root" Background="Transparent">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalIncrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.8" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Path Height="10" Width="9" Stretch="Uniform" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " Fill="{StaticResource GlyphBrush}" x:Name="path" />
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalDecrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.8" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Path Height="10" Width="9" Stretch="Uniform" Data="F1 M 110.692,342.252L 110.692,352.682L 104.594,347.467L 110.692,342.252 Z " x:Name="path" Fill="{StaticResource GlyphBrush}" />
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalIncrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Path x:Name="path" Height="10" Width="9" Stretch="Uniform" Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z " Fill="{StaticResource GlyphBrush}" />
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalDecrementTemplate" TargetType="RepeatButton">
                                                        <Grid x:Name="Root">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Path x:Name="path" Height="10" Width="9" Stretch="Uniform" Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z " Fill="{StaticResource GlyphBrush}" />
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="VerticalThumbTemplate" TargetType="Thumb">
                                                        <Grid>
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.6" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Grid Margin="1,0,1,0" x:Name="ThumbVisual">
                                                                <Rectangle x:Name="Background" Fill="{StaticResource GlyphBrush}" StrokeThickness="1" RadiusX="3" RadiusY="4" Stroke="{x:Null}" Margin="4.5,-2,5,-2" />
                                                            </Grid>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="HorizontalThumbTemplate" TargetType="Thumb">
                                                        <Grid>
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                                        <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="Pressed" />
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver" />
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed" />
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal" />
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.6" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Disabled">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ThumbVisual" Storyboard.TargetProperty="Opacity">
                                                                                <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.1" />
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Grid Margin="0,1,0,1" x:Name="ThumbVisual">
                                                                <Rectangle x:Name="Background" Fill="{StaticResource GlyphBrush}" StrokeThickness="1" RadiusX="2" RadiusY="2" Stroke="{x:Null}" Margin="-2,3.5,-2,4" />
                                                            </Grid>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Grid.Resources>
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualState x:Name="Normal" />
                                                        <vsm:VisualState x:Name="MouseOver" />
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Grid x:Name="HorizontalRoot">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <Rectangle Grid.ColumnSpan="5" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1" Fill="{StaticResource NormalBrush}" />
                                                    <RepeatButton Margin="1" x:Name="HorizontalSmallDecrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalDecrementTemplate}" Grid.Column="0" Interval="50" />
                                                    <RepeatButton x:Name="HorizontalLargeDecrease" Width="0" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="1" Interval="50" />
                                                    <Thumb MinWidth="18" x:Name="HorizontalThumb" Width="18" Background="{TemplateBinding Background}" Template="{StaticResource HorizontalThumbTemplate}" Grid.Column="2" />
                                                    <RepeatButton x:Name="HorizontalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="3" Interval="50" />
                                                    <RepeatButton Margin="1" x:Name="HorizontalSmallIncrease" Width="16" IsTabStop="False" Template="{StaticResource HorizontalIncrementTemplate}" Grid.Column="4" Interval="50" />
                                                </Grid>
                                                <Grid x:Name="VerticalRoot" Visibility="Collapsed">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="Auto" />
                                                        <RowDefinition Height="Auto" />
                                                        <RowDefinition Height="Auto" />
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Rectangle Grid.RowSpan="5" Stroke="#00000000" StrokeThickness="1" RadiusX="1" RadiusY="1" Fill="{StaticResource NormalBrush}" />
                                                    <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallDecrease" IsTabStop="False" Template="{StaticResource VerticalDecrementTemplate}" Grid.Row="0" Interval="50" />
                                                    <RepeatButton Height="0" x:Name="VerticalLargeDecrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="1" Interval="50" />
                                                    <Thumb Height="18" MinHeight="18" x:Name="VerticalThumb" Template="{StaticResource VerticalThumbTemplate}" Grid.Row="2" />
                                                    <RepeatButton x:Name="VerticalLargeIncrease" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Row="3" Interval="50" />
                                                    <RepeatButton Height="16" Margin="1" x:Name="VerticalSmallIncrease" IsTabStop="False" Template="{StaticResource VerticalIncrementTemplate}" Grid.Row="4" Interval="50" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--ScrollViewer Style-->
                            <Style x:Key="ScrollViewerStyle" TargetType="ScrollViewer">
                                <Setter Property="HorizontalContentAlignment" Value="Left" />
                                <Setter Property="VerticalContentAlignment" Value="Top" />
                                <Setter Property="VerticalScrollBarVisibility" Value="Visible" />
                                <Setter Property="Padding" Value="4" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="BorderBrush" Value="{ StaticResource NormalBorderBrush}" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ScrollViewer">
                                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                                <Grid Background="{TemplateBinding Background}">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <ScrollContentPresenter Cursor="{TemplateBinding Cursor}" Margin="{TemplateBinding Padding}" x:Name="ScrollContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" />
                                                    <Rectangle Grid.Column="1" Grid.Row="1" Fill="#FFE9EEF4" />
                                                    <ScrollBar x:Name="VerticalScrollBar" Width="18" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" IsTabStop="False" Grid.Column="1" Grid.Row="0" Orientation="Vertical" ViewportSize="{TemplateBinding ViewportHeight}" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Value="{TemplateBinding VerticalOffset}" Style="{StaticResource ScrollBarStyle}" />
                                                    <ScrollBar Height="18" x:Name="HorizontalScrollBar" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" IsTabStop="False" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" ViewportSize="{TemplateBinding ViewportWidth}" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Value="{TemplateBinding HorizontalOffset}" Style="{StaticResource ScrollBarStyle}" />
                                                </Grid>
                                            </Border>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--TabControl-->
                            <Style x:Name="TabControlStyle" TargetType="basics:TabControl">
                                <Setter Property="IsTabStop" Value="False" />
                                <Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}" />
                                <Setter Property="Padding" Value="5" />
                                <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                                <Setter Property="VerticalContentAlignment" Value="Stretch" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="basics:TabControl">
                                            <Grid>
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="0" />
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Normal" />
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualTop" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualBottom" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualLeft" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualRight" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Grid x:Name="TemplateTop" Visibility="Collapsed">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="Auto" />
                                                        <RowDefinition Height="*" />
                                                    </Grid.RowDefinitions>
                                                    <Grid>
                                                        <Rectangle HorizontalAlignment="Stretch" Fill="{StaticResource ControlBackgroundBrush}" Stroke="{x:Null}" Opacity="1" />
                                                        <primitives:TabPanel VerticalAlignment="Bottom" x:Name="TabPanelTop"  Canvas.ZIndex="1" Background="{x:Null}" HorizontalAlignment="Left" />
                                                    </Grid>
                                                    <Border Grid.Row="1" MinHeight="10" MinWidth="10" Background="White" CornerRadius="0,0,3,3">
                                                        <ScrollViewer  x:Name="SampleScroller" Style="{StaticResource ScrollViewerStyle}"  VerticalScrollBarVisibility="Auto" HorizontalAlignment="Stretch"  VerticalAlignment="Stretch">
                                                            <ContentPresenter  Cursor="{TemplateBinding Cursor}" x:Name="ContentTop"  />

                                                        </ScrollViewer>
                                                    </Border>
                                                    <Border x:Name="DisabledVisualTop" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1" Grid.Row="1" Grid.RowSpan="2" Background="{StaticResource DisabledBackgroundBrush}" CornerRadius="0,0,3,3" />
                                                </Grid>
                                                <Grid x:Name="TemplateBottom" Visibility="Collapsed">
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid Canvas.ZIndex="1" Grid.Row="1">
                                                        <Rectangle Opacity="0.5" Fill="{StaticResource HoverBrush}" Stroke="{x:Null}" />
                                                        <primitives:TabPanel x:Name="TabPanelBottom" />
                                                    </Grid>
                                                    <Border MinHeight="10" MinWidth="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3,3,0,0">
                                                        <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="ContentBottom" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                    </Border>
                                                    <Border x:Name="DisabledVisualBottom" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1" Background="{StaticResource DisabledBackgroundBrush}" CornerRadius="3,3,0,0" />
                                                </Grid>
                                                <Grid x:Name="TemplateLeft" Visibility="Collapsed">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>
                                                    <Grid Canvas.ZIndex="1">
                                                        <Rectangle Opacity="0.5" Fill="{StaticResource HoverBrush}" Stroke="{x:Null}" />
                                                        <primitives:TabPanel x:Name="TabPanelLeft" />
                                                    </Grid>
                                                    <Border MinHeight="10" MinWidth="10" Grid.Column="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,3,3,0">
                                                        <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="ContentLeft" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                    </Border>
                                                    <Border x:Name="DisabledVisualLeft" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1" Grid.Column="1" Background="{StaticResource DisabledBackgroundBrush}" CornerRadius="0,3,3,0" />
                                                </Grid>
                                                <Grid x:Name="TemplateRight" Visibility="Collapsed">
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*" />
                                                        <ColumnDefinition Width="Auto" />
                                                    </Grid.ColumnDefinitions>
                                                    <Grid Canvas.ZIndex="1" Grid.Column="1">
                                                        <Rectangle Opacity="0.5" Fill="{StaticResource HoverBrush}" Stroke="{x:Null}" />
                                                        <primitives:TabPanel x:Name="TabPanelRight" />
                                                    </Grid>
                                                    <Border MinHeight="10" MinWidth="10" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3,0,0,3">
                                                        <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="ContentRight" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                    </Border>
                                                    <Border Margin="0" x:Name="DisabledVisualRight" IsHitTestVisible="False" Opacity="0" Canvas.ZIndex="1" Background="{StaticResource DisabledBackgroundBrush}" CornerRadius="3,0,0,3" />
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--TabItem-->
                            <Style x:Name="TabItemStyle" TargetType="basics:TabItem">
                                <Setter Property="IsTabStop" Value="False" />
                                <Setter Property="Background" Value="{StaticResource NormalBrush}" />
                                <Setter Property="BorderBrush" Value="#FFA3AEB9" />
                                <Setter Property="BorderThickness" Value="0" />
                                <Setter Property="Padding" Value="6,0,6,0" />
                                <Setter Property="HorizontalContentAlignment" Value="Left" />
                                <Setter Property="VerticalContentAlignment" Value="Top" />
                                <Setter Property="MinWidth" Value="5" />
                                <Setter Property="MinHeight" Value="5" />
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="basics:TabItem">
                                            <Grid x:Name="Root" Margin="1,1,1,1">
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="0" />
                                                            <vsm:VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver" />
                                                            <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver" />
                                                            <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal" />
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Normal" />
                                                        <vsm:VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopUnSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomUnSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftUnSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightUnSelectedHoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>

                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualBottomSelected" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopUnSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomUnSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftUnSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightUnSelectedDisabledRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="SelectionStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition From="Selected" GeneratedDuration="00:00:00.5000000" To="Unselected" />
                                                            <vsm:VisualTransition From="Unselected" GeneratedDuration="00:00:00.3000000" To="Selected" />
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Unselected" />
                                                        <vsm:VisualState x:Name="Selected">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopSelectedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.45" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomSelectedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftSelectedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightSelectedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="FocusStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused" />
                                                            <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused" />
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="TopFocusedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.25" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BottomFocusedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LeftFocusedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="RightFocusedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Unfocused">
                                                            <Storyboard />
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Grid x:Name="TemplateTopSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                                                    <Border BorderThickness="1,1,1,1" CornerRadius="2,2,2,2">
                                                        <Grid>
                                                            <Rectangle x:Name="TopSelectedRectangle" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                            <Rectangle x:Name="TopFocusedRectangle" Opacity="0" Fill="{x:Null}" RadiusX="2" RadiusY="2" Stroke="{StaticResource GlyphBrush}" />
                                                            <Rectangle x:Name="TopSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" />
                                                            <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderTopSelected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                            <Rectangle x:Name="TopSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateTopUnselected" Visibility="Collapsed">
                                                    <Border x:Name="BorderTop" BorderThickness="1" CornerRadius="3,3,0,0">
                                                        <Border x:Name="GradientTop" BorderBrush="{x:Null}" BorderThickness="1" CornerRadius="1,1,0,0" Background="{x:Null}">
                                                            <Grid>
                                                                <Rectangle x:Name="TopUnSelectedBackground" Fill="{StaticResource NormalBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <Rectangle x:Name="TopUnSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderTopUnselected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                                <Rectangle x:Name="TopUnSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                            </Grid>
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateBottomSelected" Visibility="Collapsed" Canvas.ZIndex="1">
                                                    <Border Margin="-2,0,-2,-2" BorderThickness="1,0,1,1" CornerRadius="0,0,3,3">
                                                        <Border BorderBrush="{x:Null}" BorderThickness="1" CornerRadius="0,0,1,1" Background="{x:Null}">
                                                            <Grid>
                                                                <Rectangle x:Name="BottomSelectedRectangle" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <Rectangle x:Name="BottomFocusedRectangle" Opacity="0" Fill="{x:Null}" RadiusX="2" RadiusY="2" Stroke="{StaticResource GlyphBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <Rectangle x:Name="BottomSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderBottomSelected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                                <Rectangle x:Name="BottomSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                            </Grid>
                                                        </Border>
                                                    </Border>
                                                    <Border Margin="-2,0,-2,-2" x:Name="DisabledVisualBottomSelected" IsHitTestVisible="false" Opacity="0" Background="#8CFFFFFF" CornerRadius="0,0,3,3" />
                                                </Grid>
                                                <Grid x:Name="TemplateBottomUnselected" Visibility="Collapsed">
                                                    <Border x:Name="BorderBottom" BorderThickness="1" CornerRadius="0,0,3,3">
                                                        <Border x:Name="GradientBottom" BorderBrush="{x:Null}" BorderThickness="1" CornerRadius="0,0,1,1" Background="{x:Null}">
                                                            <Grid>
                                                                <Rectangle x:Name="BottomUnSelectedBackground" Fill="{StaticResource NormalBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <Rectangle x:Name="BottomUnSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                                <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderBottomUnselected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                                <Rectangle x:Name="BottomUnSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                                                            </Grid>
                                                        </Border>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateLeftSelected" Visibility="Collapsed" Canvas.ZIndex="1" Margin="1,1,1,1">
                                                    <Border BorderThickness="1,1,0,1" CornerRadius="3,0,0,3">
                                                        <Grid>
                                                            <Rectangle x:Name="LeftSelectedRectangle" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                            <Rectangle x:Name="LeftFocusedRectangle" Opacity="0" Fill="{x:Null}" RadiusX="2" RadiusY="2" Stroke="{StaticResource GlyphBrush}" />
                                                            <Rectangle x:Name="LeftSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" />
                                                            <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderLeftSelected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                            <Rectangle x:Name="LeftSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateLeftUnselected" Visibility="Collapsed" Margin="1,1,1,1">
                                                    <Border x:Name="BorderLeft" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3,0,0,3">
                                                        <Grid>
                                                            <Rectangle x:Name="LeftUnSelectedBackground" Fill="{StaticResource NormalBrush}" RadiusX="2" RadiusY="2" />
                                                            <Rectangle x:Name="LeftUnSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" RadiusX="2" RadiusY="2" />
                                                            <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderLeftUnselected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                            <Rectangle x:Name="LeftUnSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateRightSelected" Visibility="Collapsed" Canvas.ZIndex="1" Margin="1,1,1,1">
                                                    <Border Margin="0,-2,-2,-2" BorderThickness="0,1,1,1" CornerRadius="0,3,3,0">
                                                        <Grid>
                                                            <Rectangle x:Name="RightSelectedRectangle" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                            <Rectangle x:Name="RightFocusedRectangle" Opacity="0" Fill="{x:Null}" RadiusX="2" RadiusY="2" Stroke="{StaticResource GlyphBrush}" />
                                                            <Rectangle x:Name="RightSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" />
                                                            <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderRightSelected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                            <Rectangle x:Name="RightSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                                <Grid x:Name="TemplateRightUnselected" Visibility="Collapsed" Margin="1,1,1,1">
                                                    <Border x:Name="BorderRight" BorderThickness="1" CornerRadius="0,3,3,0">
                                                        <Grid>
                                                            <Rectangle x:Name="RightUnSelectedBackground" Fill="{StaticResource NormalBrush}" RadiusX="2" RadiusY="2" />
                                                            <Rectangle x:Name="RightUnSelectedHoverRectangle" Opacity="0" Fill="{StaticResource HoverBrush}" RadiusX="2" RadiusY="2" />
                                                            <ContentControl FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding Foreground}" IsTabStop="False" Cursor="{TemplateBinding Cursor}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Margin="{TemplateBinding Padding}" x:Name="HeaderRightUnselected" VerticalAlignment="{TemplateBinding VerticalAlignment}" />
                                                            <Rectangle x:Name="RightUnSelectedDisabledRectangle" Opacity="0" Fill="{StaticResource DisabledBackgroundBrush}" RadiusX="2" RadiusY="2" />
                                                        </Grid>
                                                    </Border>
                                                </Grid>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
                            </Style>
                            <!--TreeView Style-->
                            <Style x:Key="TreeViewStyle1" TargetType="controls:TreeView">
                                <Setter Property="Foreground" Value="#FF000000"/>
                                <Setter Property="FontSize" Value="12"/>
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="VerticalContentAlignment" Value="Top"/>
                                <Setter Property="Cursor" Value="Arrow"/>
                                <Setter Property="Padding" Value="1"/>
                                <Setter Property="IsTabStop" Value="False"/>
                                <Setter Property="TabNavigation" Value="Once"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="controls:TreeView">
                                            <Grid x:Name="Root">
                                                <Grid.Resources>
                                                    <SolidColorBrush x:Key="BorderBrush" Color="#FF885A2C"/>
                                                </Grid.Resources>
                                                <Border x:Name="Border" BorderBrush="#FF885A2C" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                                    <ScrollViewer Style="{StaticResource ScrollViewerStyle}" Margin="1" x:Name="ScrollViewer" Background="{TemplateBinding Background}" BorderBrush="Transparent" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}" TabNavigation="Once" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                                        <ItemsPresenter Margin="5" x:Name="TreeItems"/>
                                                    </ScrollViewer>
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--TreeViewItem Style-->
                            <Style x:Key="TreeViewItemStyle" TargetType="controls:TreeViewItem">
                                <Setter Property="Padding" Value="3"/>
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="VerticalContentAlignment" Value="Top"/>
                                <Setter Property="Background" Value="Transparent"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="Cursor" Value="Arrow"/>
                                <Setter Property="IsTabStop" Value="True"/>
                                <Setter Property="TabNavigation" Value="Once"/>
                                <Setter Property="IsExpanded" Value="True"/> 
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="controls:TreeViewItem">
                                            <Grid Background="#00FFFFFF">
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualState x:Name="Normal"/>
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard/>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="SelectionStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="00:00:00.1000000"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Unselected"/>
                                                        <vsm:VisualState x:Name="Selected">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="select" Storyboard.TargetProperty="Opacity" To=".75"/>
                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="select" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF3C4789"/>
                                                                </ColorAnimationUsingKeyFrames>

                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="HasItemsStates">
                                                        <vsm:VisualState x:Name="HasItems"/>
                                                        <vsm:VisualState x:Name="NoItems">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="ExpansionStates">
                                                        <vsm:VisualState x:Name="Collapsed"/>
                                                        <vsm:VisualState x:Name="Expanded">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ItemsHost" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Grid.RowDefinitions>
                                                    <RowDefinition Height="22"/>
                                                    <RowDefinition Height="*"/>
                                                </Grid.RowDefinitions>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="22"/>
                                                    <ColumnDefinition Width="Auto"/>

                                                </Grid.ColumnDefinitions>
                                                <ToggleButton HorizontalAlignment="Stretch" x:Name="ExpanderButton" VerticalAlignment="Stretch" IsTabStop="False" TabNavigation="Once" Canvas.ZIndex="1" Background="#FF104777" Width="17" Height="17">
                                                    <ToggleButton.Template>
                                                        <ControlTemplate TargetType="ToggleButton">
                                                            <Grid x:Name="Root" Background="Transparent" RenderTransformOrigin="0.5,0.5">
                                                                <Grid.RenderTransform>
                                                                    <TransformGroup>
                                                                        <ScaleTransform/>
                                                                        <SkewTransform/>
                                                                        <RotateTransform/>
                                                                        <TranslateTransform/>
                                                                    </TransformGroup>
                                                                </Grid.RenderTransform>
                                                                <vsm:VisualStateManager.VisualStateGroups>
                                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                                        <vsm:VisualState x:Name="Normal"/>
                                                                        <vsm:VisualState x:Name="MouseOver">
                                                                            <Storyboard>
                                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFFFFF"/>
                                                                                </ColorAnimationUsingKeyFrames>
                                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF454545"/>
                                                                                </ColorAnimationUsingKeyFrames>
                                                                            </Storyboard>
                                                                        </vsm:VisualState>
                                                                        <vsm:VisualState x:Name="Disabled">
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To=".7"/>
                                                                            </Storyboard>
                                                                        </vsm:VisualState>
                                                                    </vsm:VisualStateGroup>
                                                                    <vsm:VisualStateGroup x:Name="CheckStates">
                                                                        <vsm:VisualStateGroup.Transitions>
                                                                            <vsm:VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                                                        </vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualState x:Name="Unchecked"/>
                                                                        <vsm:VisualState x:Name="Checked">
                                                                            <Storyboard>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="UncheckedVisual" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="90"/>
                                                                                </DoubleAnimationUsingKeyFrames>
                                                                            </Storyboard>
                                                                        </vsm:VisualState>
                                                                    </vsm:VisualStateGroup>
                                                                </vsm:VisualStateManager.VisualStateGroups>
                                                                <Ellipse Stroke="{x:Null}" StrokeLineJoin="Miter" StrokeThickness="1" Margin="1.75,2,2.25,2">
                                                                    <Ellipse.Fill>
                                                                        <RadialGradientBrush>
                                                                            <GradientStop Color="#FFD5D8E1"/>
                                                                            <GradientStop Color="#FF29304D" Offset="1"/>
                                                                        </RadialGradientBrush>
                                                                    </Ellipse.Fill>
                                                                </Ellipse>
                                                                <Grid RenderTransformOrigin="0.5,0.5" Margin="1,0,0,0">
                                                                    <Grid.RenderTransform>
                                                                        <TransformGroup>
                                                                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                                                                            <SkewTransform/>
                                                                            <RotateTransform/>
                                                                            <TranslateTransform/>
                                                                        </TransformGroup>
                                                                    </Grid.RenderTransform>
                                                                    <Path Height="10" HorizontalAlignment="Right" x:Name="UncheckedVisual" VerticalAlignment="Center" Width="7" Fill="#FF1D2036" StrokeLineJoin="Miter" StrokeThickness="1" Data="M 0,0 L 0,9 L 5,4.5 Z" Margin="0,0,0,0" RenderTransformOrigin="0.5,0.5" Stroke="#FF6A6A6A">
                                                                        <Path.RenderTransform>
                                                                            <TransformGroup>
                                                                                <ScaleTransform/>
                                                                                <SkewTransform/>
                                                                                <RotateTransform/>
                                                                                <TranslateTransform X="-3"/>
                                                                            </TransformGroup>
                                                                        </Path.RenderTransform>
                                                                    </Path>
                                                                </Grid>
                                                            </Grid>
                                                        </ControlTemplate>
                                                    </ToggleButton.Template>
                                                </ToggleButton>
                                                <Rectangle x:Name="inactive" IsHitTestVisible="False" Opacity="0" Grid.Column="1" Fill="#FF999999" Stroke="#FF333333" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                                <Button Cursor="{TemplateBinding Cursor}" x:Name="Header" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Background="{TemplateBinding Background}" IsTabStop="False" TabNavigation="Once" Grid.Column="1" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ClickMode="Hover" Margin="4,0,0,0" Foreground="#FFFFFFFF"  HorizontalAlignment="Left">
                                                    <Button.Template>
                                                        <ControlTemplate TargetType="Button">
                                                            <Grid Background="{TemplateBinding Background}">
                                                                <vsm:VisualStateManager.VisualStateGroups>
                                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                                        <vsm:VisualState x:Name="Normal"/>
                                                                        <vsm:VisualState x:Name="Pressed">
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="hover" Storyboard.TargetProperty="Opacity" To=".5"/>
                                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="hover" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
                                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF2A3164"/>
                                                                                </ColorAnimationUsingKeyFrames>
                                                                            </Storyboard>
                                                                        </vsm:VisualState>
                                                                        <vsm:VisualState x:Name="Disabled">
                                                                            <Storyboard>
                                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="content" Storyboard.TargetProperty="Opacity" To=".55"/>
                                                                            </Storyboard>
                                                                        </vsm:VisualState>
                                                                    </vsm:VisualStateGroup>
                                                                </vsm:VisualStateManager.VisualStateGroups>
                                                                <Rectangle x:Name="hover" IsHitTestVisible="False" Opacity="0" Fill="#FF5E6385" StrokeThickness="1" RadiusX="2" RadiusY="2" Margin="-75,0,-127,0" Canvas.ZIndex="-1"/>
                                                                <ContentPresenter Cursor="{TemplateBinding Cursor}" HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" x:Name="content" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                            </Grid>
                                                        </ControlTemplate>
                                                    </Button.Template>
                                                </Button>
                                                <ItemsPresenter x:Name="ItemsHost" Margin="-20,0,0,0" Visibility="Collapsed" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" RenderTransformOrigin="0.5,0.5"/>
                                                <Rectangle x:Name="select" IsHitTestVisible="False" Opacity="0" Grid.Column="0" StrokeThickness="1" RadiusX="2" RadiusY="2" Grid.ColumnSpan="2" Canvas.ZIndex="-1" Margin="-85,0,-125.75,0" HorizontalAlignment="Stretch" Fill="#FF000000"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--ToggleButtonStyle-->
                            <Style x:Key="ToggleButtonStyle" TargetType="ToggleButton">
                                <Setter Property="Background" Value="#FF1F3B53"/>
                                <Setter Property="Foreground" Value="White"/>
                                <Setter Property="Padding" Value="3"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="BorderBrush" Value="#FF885A2C"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ToggleButton">
                                            <Grid>
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualState x:Name="Normal"/>
                                                        <vsm:VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="BackgroundAnimation" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFB3793F"/>
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="CheckStates">
                                                        <vsm:VisualState x:Name="Checked">
                                                            <Storyboard/>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Unchecked"/>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="FocusStates">
                                                        <vsm:VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame KeyTime="00:00:00" Value="#FF724D27"/>
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Unfocused"/>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Border x:Name="Background" BorderBrush="#FF885A2C" Background="{x:Null}" BorderThickness="1" CornerRadius="3">
                                                    <Grid Margin="1" Background="{TemplateBinding Background}">
                                                        <Border x:Name="BackgroundAnimation" Opacity="0" Background="#FF284F70"/>
                                                        <Rectangle x:Name="BackgroundGradient" Stroke="{x:Null}">
                                                            <Rectangle.Fill>
                                                                <LinearGradientBrush EndPoint="0.699999988079071,1" StartPoint="0.699999988079071,0">
                                                                    <GradientStop Color="#FF1B2034"/>
                                                                    <GradientStop Color="#FF16192B" Offset="1"/>

                                                                </LinearGradientBrush>
                                                            </Rectangle.Fill>
                                                        </Rectangle>
                                                    </Grid>
                                                </Border>
                                                <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                <Rectangle x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Fill="#FFFFFFFF" RadiusX="3" RadiusY="3"/>
                                                <Rectangle Margin="1" x:Name="FocusVisualElement" IsHitTestVisible="false" Opacity="0" Stroke="#FF885A2C" StrokeThickness="1" RadiusX="2" RadiusY="2"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--ListBoxItem-->
                            <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
                                <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                <Setter Property="VerticalContentAlignment" Value="Top"/>
                                <Setter Property="Background" Value="Transparent"/>
                                <Setter Property="BorderThickness" Value="1"/>
                                <Setter Property="TabNavigation" Value="Local"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ListBoxItem">
                                            <Grid Margin="1,1,1,1" Background="{StaticResource NormalBrush}">
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                            <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Normal"/>
                                                        <vsm:VisualState x:Name="MouseOver">
                                                            <Storyboard>

                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                </DoubleAnimationUsingKeyFrames>

                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="SelectionStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition From="Unselected" GeneratedDuration="00:00:00.3000000" To="Selected"/>
                                                            <vsm:VisualTransition From="Selected" GeneratedDuration="00:00:00.5000000" To="Unselected"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Unselected"/>
                                                        <vsm:VisualState x:Name="Selected">
                                                            <Storyboard>

                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="SelectedRectangle" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.45"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.675"/>
                                                                </DoubleAnimationUsingKeyFrames>

                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="FocusStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused"/>
                                                            <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                    <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.5"/>
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Unfocused"/>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Rectangle x:Name="Background" IsHitTestVisible="False" Opacity="0.25" Fill="{StaticResource ControlBackgroundBrush}" RadiusX="1" RadiusY="1"/>
                                                <Rectangle x:Name="HoverRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource HoverBrush}" RadiusX="1" RadiusY="1"/>
                                                <Rectangle x:Name="SelectedRectangle" IsHitTestVisible="False" Opacity="0" Fill="{StaticResource SelectedBackgroundBrush}" RadiusX="1" RadiusY="1"/>
                                                <ContentPresenter HorizontalAlignment="Left" Margin="{TemplateBinding Padding}" x:Name="contentPresenter" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                <Rectangle x:Name="FocusVisualElement" Visibility="Collapsed" Stroke="{StaticResource HoverShineBrush}" StrokeThickness="1" RadiusX="1" RadiusY="1"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--ListBox-->
                            <Style x:Key="ListBoxStyle" TargetType="ListBox">
                                <Setter Property="Padding" Value="1" />
                                <Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}" />
                                <Setter Property="Foreground" Value="{StaticResource TextBrush}" />
                                <Setter Property="HorizontalContentAlignment" Value="Left" />
                                <Setter Property="VerticalContentAlignment" Value="Top" />
                                <Setter Property="IsTabStop" Value="False" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="TabNavigation" Value="Once" />

                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FFA3AEB9" Offset="0" />
                                            <GradientStop Color="#FF8399A9" Offset="0.375" />
                                            <GradientStop Color="#FF718597" Offset="0.375" />
                                            <GradientStop Color="#FF617584" Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ListBox">
                                            <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2">
                                                <ScrollViewer BorderBrush="Transparent" BorderThickness="0" Padding="{TemplateBinding Padding}" x:Name="ScrollViewer" Style="{StaticResource ScrollViewerStyle}" Background="{StaticResource ControlBackgroundBrush}">
                                                    <ItemsPresenter />
                                                </ScrollViewer>
                                            </Border>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <!--Expander-->
                            <Style x:Key="ExpanderStyle" TargetType="controls:Expander">
                                <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                                <Setter Property="VerticalContentAlignment" Value="Stretch"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="controls:Expander">
                                            <Grid Background="Transparent">
                                                <Grid.Resources>

                                                    <Style x:Key="SLExpanderContentControl" TargetType="ContentControl">
                                                        <Setter Property="Foreground" Value="#FF000000"/>
                                                        <Setter Property="HorizontalContentAlignment" Value="Left"/>
                                                        <Setter Property="VerticalContentAlignment" Value="Top"/>
                                                        <Setter Property="Template">
                                                            <Setter.Value>
                                                                <ControlTemplate TargetType="ContentControl">
                                                                    <Grid>
                                                                        <Border Background="{StaticResource NormalBrush}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="1,1,1,1"/>
                                                                        <ContentPresenter Cursor="{TemplateBinding Cursor}" Margin="4,4,4,4" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                    </Grid>
                                                                </ControlTemplate>
                                                            </Setter.Value>
                                                        </Setter>
                                                        <Setter Property="Background" Value="{StaticResource NormalBrush}"/>
                                                    </Style>

                                                    <LinearGradientBrush x:Key="ExpanderArrowFill" EndPoint="0,1" StartPoint="0,0">
                                                        <GradientStop Color="White" Offset="0"/>
                                                        <GradientStop Color="#FFBFBFBF" Offset="0.5"/>
                                                        <GradientStop Color="#FF878787" Offset="1"/>
                                                    </LinearGradientBrush>
                                                    <LinearGradientBrush x:Key="ExpanderArrowHoverFill" EndPoint="0,1" StartPoint="0,0">
                                                        <GradientStop Color="#FFF0F8FE" Offset="0"/>
                                                        <GradientStop Color="#FFE0F3FE" Offset="0.3"/>
                                                        <GradientStop Color="#FF6FA7C5" Offset="1"/>
                                                    </LinearGradientBrush>
                                                    <LinearGradientBrush x:Key="ExpanderArrowPressedFill" EndPoint="0,1" StartPoint="0,0">
                                                        <GradientStop Color="#FFDCF0FA" Offset="0"/>
                                                        <GradientStop Color="#FFC5E6F7" Offset="0.2"/>
                                                        <GradientStop Color="#FF5690D0" Offset="1"/>
                                                    </LinearGradientBrush>
                                                    <ControlTemplate x:Key="ExpanderDownHeaderTemplate" TargetType="ToggleButton">
                                                        <Grid Background="Transparent">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CheckStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Checked">
                                                                        <Storyboard>
                                                                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)">
                                                                                <SplinePointKeyFrame KeyTime="00:00:00" Value="0.5,0.5"/>
                                                                            </PointAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unchecked">
                                                                        <Storyboard/>
                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal"/>
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="FocusStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused"/>
                                                                        <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Focused">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unfocused"/>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Border Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Background="{StaticResource NormalBrush}">
                                                                <Grid Background="Transparent">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="*"/>
                                                                        <ColumnDefinition Width="19"/>
                                                                    </Grid.ColumnDefinitions>
                                                                    <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="1" x:Name="grid">
                                                                        <Grid.RenderTransform>
                                                                            <TransformGroup>
                                                                                <ScaleTransform/>
                                                                                <SkewTransform/>
                                                                                <RotateTransform/>
                                                                                <TranslateTransform/>
                                                                            </TransformGroup>
                                                                        </Grid.RenderTransform>
                                                                        <Border Height="19" Width="19" Background="{StaticResource PressedBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background"/>
                                                                        <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource SelectedBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0"/>
                                                                        <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5" RenderTransformOrigin="0.5,0.5">
                                                                            <Path.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform ScaleY="-1"/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Path.RenderTransform>
                                                                            <Path.Stroke>
                                                                                <SolidColorBrush Color="{StaticResource TextColor}"/>
                                                                            </Path.Stroke>
                                                                        </Path>
                                                                    </Grid>
                                                                    <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" x:Name="header" VerticalAlignment="Center" Grid.Column="0" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                </Grid>
                                                            </Border>
                                                            <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                                            <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                                        </Grid>
                                                    </ControlTemplate>




                                                    <ControlTemplate x:Key="ExpanderUpHeaderTemplate" TargetType="ToggleButton">
                                                        <Grid Background="Transparent">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CheckStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Checked">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unchecked"/>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal"/>
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="FocusStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused"/>
                                                                        <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Focused">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unfocused"/>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Border Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Background="{StaticResource NormalBrush}">
                                                                <Grid Background="Transparent">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="19"/>
                                                                        <ColumnDefinition Width="*"/>
                                                                    </Grid.ColumnDefinitions>

                                                                    <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                                                        <Grid.RenderTransform>
                                                                            <TransformGroup>
                                                                                <TransformGroup.Children>
                                                                                    <TransformCollection>
                                                                                        <RotateTransform Angle="180"  CenterX="9.5" CenterY="9.5"/>
                                                                                    </TransformCollection>
                                                                                </TransformGroup.Children>
                                                                            </TransformGroup>
                                                                        </Grid.RenderTransform>
                                                                        <Border Height="19" Width="19" Background="{StaticResource PressedBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="180"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource SelectedBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="180"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                                            <Path.Stroke>
                                                                                <SolidColorBrush Color="{StaticResource TextColor}"/>
                                                                            </Path.Stroke>
                                                                        </Path>
                                                                    </Grid>
                                                                    <ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" x:Name="header" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                </Grid>
                                                            </Border>
                                                            <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                                            <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="ExpanderLeftHeaderTemplate" TargetType="ToggleButton">
                                                        <Grid Background="Transparent">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CheckStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Checked">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unchecked"/>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal"/>
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="FocusStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused"/>
                                                                        <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Focused">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unfocused"/>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Border Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Background="{StaticResource NormalBrush}">
                                                                <Grid Background="Transparent">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="19"/>
                                                                        <ColumnDefinition Width="*"/>
                                                                    </Grid.ColumnDefinitions>

                                                                    <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                                                        <Grid.RenderTransform>
                                                                            <TransformGroup>
                                                                                <TransformGroup.Children>
                                                                                    <TransformCollection>
                                                                                        <RotateTransform Angle="90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    </TransformCollection>
                                                                                </TransformGroup.Children>
                                                                            </TransformGroup>
                                                                        </Grid.RenderTransform>
                                                                        <Border Height="19" Width="19" Background="{StaticResource PressedBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="-90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource SelectedBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="-90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                                            <Path.Stroke>
                                                                                <SolidColorBrush Color="{StaticResource TextColor}"/>
                                                                            </Path.Stroke>
                                                                        </Path>
                                                                    </Grid>
                                                                </Grid>
                                                            </Border>
                                                            <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                                            <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                                            <ContentPresenter x:Name="header" VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" Margin="0,42,0,0" >
                                                                <ContentPresenter.RenderTransform>
                                                                    <TransformGroup>
                                                                        <ScaleTransform/>
                                                                        <SkewTransform/>
                                                                        <RotateTransform Angle="90"/>
                                                                        <TranslateTransform/>
                                                                    </TransformGroup>
                                                                </ContentPresenter.RenderTransform>
                                                            </ContentPresenter>
                                                        </Grid>
                                                    </ControlTemplate>
                                                    <ControlTemplate x:Key="ExpanderRightHeaderTemplate" TargetType="ToggleButton">
                                                        <Grid Background="Transparent">
                                                            <vsm:VisualStateManager.VisualStateGroups>
                                                                <vsm:VisualStateGroup x:Name="CheckStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Checked">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="arrow" Storyboard.TargetProperty="Data">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="M 1,4.5 L 4.5,1 L 8,4.5"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unchecked"/>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="CommonStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition GeneratedDuration="0"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="MouseOver"/>
                                                                        <vsm:VisualTransition GeneratedDuration="00:00:00.1" To="Pressed"/>
                                                                        <vsm:VisualTransition From="Normal" GeneratedDuration="00:00:00.3000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.5000000" To="Normal"/>
                                                                        <vsm:VisualTransition From="Pressed" GeneratedDuration="00:00:00.5000000" To="MouseOver"/>
                                                                        <vsm:VisualTransition From="MouseOver" GeneratedDuration="00:00:00.3000000" To="Pressed"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Normal"/>
                                                                    <vsm:VisualState x:Name="MouseOver">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="HoverBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="FullControlHover" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Pressed">
                                                                        <Storyboard>
                                                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.7"/>
                                                                            </DoubleAnimationUsingKeyFrames>
                                                                        </Storyboard>

                                                                    </vsm:VisualState>
                                                                </vsm:VisualStateGroup>
                                                                <vsm:VisualStateGroup x:Name="FocusStates">
                                                                    <vsm:VisualStateGroup.Transitions>
                                                                        <vsm:VisualTransition From="Focused" GeneratedDuration="00:00:00.5000000" To="Unfocused"/>
                                                                        <vsm:VisualTransition From="Unfocused" GeneratedDuration="00:00:00.3000000" To="Focused"/>
                                                                    </vsm:VisualStateGroup.Transitions>
                                                                    <vsm:VisualState x:Name="Focused">
                                                                        <Storyboard>
                                                                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                            </ObjectAnimationUsingKeyFrames>
                                                                        </Storyboard>
                                                                    </vsm:VisualState>
                                                                    <vsm:VisualState x:Name="Unfocused"/>
                                                                </vsm:VisualStateGroup>
                                                            </vsm:VisualStateManager.VisualStateGroups>
                                                            <Border Padding="{TemplateBinding Padding}" CornerRadius="3,3,3,3" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" Background="{StaticResource NormalBrush}">
                                                                <Grid Background="Transparent">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="19"/>
                                                                        <ColumnDefinition Width="*"/>
                                                                    </Grid.ColumnDefinitions>

                                                                    <Grid HorizontalAlignment="Left" VerticalAlignment="Top">
                                                                        <Grid.RenderTransform>
                                                                            <TransformGroup>
                                                                                <TransformGroup.Children>
                                                                                    <TransformCollection>
                                                                                        <RotateTransform Angle="-90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    </TransformCollection>
                                                                                </TransformGroup.Children>
                                                                            </TransformGroup>
                                                                        </Grid.RenderTransform>
                                                                        <Border Height="19" Width="19" Background="{StaticResource PressedBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" x:Name="Background">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Border Height="19" x:Name="HoverBorder" Width="19" Background="{StaticResource SelectedBackgroundBrush}" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3,3,3,3" Opacity="0">
                                                                            <Border.RenderTransform>
                                                                                <TransformGroup>
                                                                                    <ScaleTransform/>
                                                                                    <SkewTransform/>
                                                                                    <RotateTransform Angle="90"  CenterX="9.5" CenterY="9.5"/>
                                                                                    <TranslateTransform/>
                                                                                </TransformGroup>
                                                                            </Border.RenderTransform>
                                                                        </Border>
                                                                        <Path HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" StrokeThickness="2" Data="M 1,1.5 L 4.5,5 L 8,1.5">
                                                                            <Path.Stroke>
                                                                                <SolidColorBrush Color="{StaticResource TextColor}"/>
                                                                            </Path.Stroke>
                                                                        </Path>
                                                                    </Grid>
                                                                </Grid>
                                                            </Border>
                                                            <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3"/>
                                                            <Border x:Name="FullControlHover" IsHitTestVisible="false" Visibility="Visible" BorderBrush="{StaticResource NormalBorderBrush}" BorderThickness="2,2,2,2" CornerRadius="3" Opacity="0"/>
                                                            <ContentPresenter x:Name="header" VerticalAlignment="Top" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" Margin="0,42,0,0" >
                                                                <ContentPresenter.RenderTransform>
                                                                    <TransformGroup>
                                                                        <ScaleTransform/>
                                                                        <SkewTransform/>
                                                                        <RotateTransform Angle="-90"/>
                                                                        <TranslateTransform/>
                                                                    </TransformGroup>
                                                                </ContentPresenter.RenderTransform>
                                                            </ContentPresenter>
                                                        </Grid>
                                                    </ControlTemplate>
                                                </Grid.Resources>
                                                <vsm:VisualStateManager.VisualStateGroups>
                                                    <vsm:VisualStateGroup x:Name="CommonStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="0"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Normal"/>
                                                        <vsm:VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="(UIElement.Opacity)" To="1"/>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="FocusStates">
                                                        <vsm:VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="Unfocused"/>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="ExpansionStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="0"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="Collapsed"/>
                                                        <vsm:VisualState x:Name="Expanded">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                    <vsm:VisualStateGroup x:Name="ExpandDirectionStates">
                                                        <vsm:VisualStateGroup.Transitions>
                                                            <vsm:VisualTransition GeneratedDuration="0"/>
                                                        </vsm:VisualStateGroup.Transitions>
                                                        <vsm:VisualState x:Name="ExpandDown">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd1" Storyboard.TargetProperty="Height">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="ExpandUp">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderUpHeaderTemplate}"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(Grid.Row)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="ExpandLeft">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderLeftHeaderTemplate}"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="(Grid.Column)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd0" Storyboard.TargetProperty="Width">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                        <vsm:VisualState x:Name="ExpandRight">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpanderButton" Storyboard.TargetProperty="Template">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ExpanderRightHeaderTemplate}"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Row)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="1" Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="(Grid.Column)">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="1"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="rd0" Storyboard.TargetProperty="Height">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="cd1" Storyboard.TargetProperty="Width">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="*"/>
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </vsm:VisualState>
                                                    </vsm:VisualStateGroup>
                                                </vsm:VisualStateManager.VisualStateGroups>
                                                <Border x:Name="Background" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" Padding="{TemplateBinding Padding}">
                                                    <Grid>
                                                        <Grid.RowDefinitions>
                                                            <RowDefinition Height="Auto" x:Name="rd0"/>
                                                            <RowDefinition Height="Auto" x:Name="rd1"/>
                                                        </Grid.RowDefinitions>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="Auto" x:Name="cd0"/>
                                                            <ColumnDefinition Width="Auto" x:Name="cd1"/>
                                                        </Grid.ColumnDefinitions>
                                                        <ToggleButton HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" MinHeight="0" MinWidth="0" x:Name="ExpanderButton" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" Template="{StaticResource ExpanderDownHeaderTemplate}" Grid.Column="0" Grid.Row="0" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" IsChecked="{TemplateBinding IsExpanded}"/>
                                                        <ContentControl HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="1" MinHeight="0" MinWidth="0" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" Grid.Column="0" Grid.Row="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" Style="{StaticResource SLExpanderContentControl}" Background="{TemplateBinding Background}"/>
                                                    </Grid>
                                                </Border>
                                                <Border x:Name="DisabledVisualElement" IsHitTestVisible="false" Opacity="0" Background="{StaticResource DisabledBackgroundBrush}" CornerRadius="3"/>
                                                <Border x:Name="FocusVisualElement" IsHitTestVisible="false" Visibility="Collapsed" BorderBrush="{StaticResource HoverShineBrush}" BorderThickness="1" CornerRadius="3"/>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Background" Value="{StaticResource ControlBackgroundBrush}"/>
                            </Style>
                        </Grid.Resources>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <!--Background Image-->
                        <controls:Viewbox Grid.ColumnSpan="2" Grid.RowSpan="4" VerticalAlignment="Top" HorizontalAlignment="Left" StretchDirection="Both" Stretch="UniformToFill">
                            <common:EmbeddedImage ResourceName="SamplesBackground.jpg"/>
                        </controls:Viewbox>
                        <!--Silverlight Toolkit Logo-->
                        <controls:Viewbox Stretch="Uniform" Height="Auto" VerticalAlignment="Top" Padding="31,0,0,0" Grid.RowSpan="1" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="300" Margin="24,20,0,0">
                            <common:EmbeddedImage ResourceName="SilverlightToolkitLogoInver.png"/>
                        </controls:Viewbox>
                        <!--Submenu for codeplex link-->
                        <Border Background="#67000000" Margin="0,20,0,0"  Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch">
                            <StackPanel Margin="0,1,0,1" Orientation="Horizontal" HorizontalAlignment="Right">
                                <!-- Bug report link -->
                                <HyperlinkButton 
                                  Content="Report bugs, ask questions, request features on"
                                  NavigateUri="http://codeplex.com/silverlight"
                                  TargetName="_blank"
                                  VerticalAlignment="Center"
                                  HorizontalAlignment="Right"
                                  Margin="5,0,5,0"
                                  Foreground="#FFFFFF"/>
                                <!-- code plex logo link -->
                                <HyperlinkButton
                                  NavigateUri="http://codeplex.com/silverlight"
                                  TargetName="_blank"
                                  HorizontalAlignment="Right"
                                        VerticalAlignment="Center"
                                  Margin="0,1,10,0"
                                  Foreground="#FFFFFF">
                                    <common:EmbeddedImage ResourceName="codeplexlogo.png" Width="50" Height="17"/>
                                </HyperlinkButton>
                            </StackPanel>
                        </Border>
                        <basics:GridSplitter Grid.Row="1" Grid.ColumnSpan="2" HorizontalAlignment="Stretch" Height="1" Background="Transparent"></basics:GridSplitter>
                        <!-- List of Samples -->
                        <controls:TreeView x:Name="SampleSelection" Grid.Row="3" Width="200" Margin="0,0,5,5" Background="#67000000" Style="{StaticResource TreeViewStyle1}" ItemContainerStyle="{StaticResource TreeViewItemStyle}" RenderTransformOrigin="0.5,0.5" Foreground="#FFFFFFFF">
                            <controls:TreeView.Resources>
                                <Storyboard x:Key="Show">
                                    <DoubleAnimationUsingKeyFrames  BeginTime="00:00:00" Storyboard.TargetName="SampleSelection" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                                        <SplineDoubleKeyFrame KeyTime="00:00:00" Value="-202"/>
                                        <SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0,0,0,0.903999984264374"/>
                                    </DoubleAnimationUsingKeyFrames>
                                </Storyboard>
                                <controls:HierarchicalDataTemplate x:Key="AssemblyNameTemplate">
                                    <StackPanel Orientation="Horizontal">
                                        <controls:Viewbox Height="16" Width="16" Margin="0,0,4,0" VerticalAlignment="Bottom">
                                            <ContentControl Content="{Binding Icon}" />
                                        </controls:Viewbox>
                                        <TextBlock Text="{Binding Path=TreeItemName}" />
                                    </StackPanel>
                                </controls:HierarchicalDataTemplate>
                            </controls:TreeView.Resources>
                            <controls:TreeView.ItemTemplate>
                                <controls:HierarchicalDataTemplate ItemsSource="{Binding Path=Items}" ItemTemplate="{StaticResource AssemblyNameTemplate}">
                                    <TextBlock  Text="{Binding Path=TreeItemName}" />
                                </controls:HierarchicalDataTemplate>
                            </controls:TreeView.ItemTemplate>
                            <controls:TreeView.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform/>
                                    <SkewTransform/>
                                    <RotateTransform/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </controls:TreeView.RenderTransform>
                            <controls:TreeView.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel x:Name="SampleSelectionContainer"  />
                                </ItemsPanelTemplate>
                            </controls:TreeView.ItemsPanel>
                        </controls:TreeView>
                        <!-- Full Screen Button -->
                        <ToggleButton
                          x:Name="FullScreenButton"
                          Grid.Row="4"
                          Content="View Full Screen"
                          Background="#000000"
                          Margin="2 0 4 5"
                          HorizontalAlignment="Stretch" Style="{StaticResource ToggleButtonStyle}" Visibility="Visible" />
                        <basics:GridSplitter Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Width="1" VerticalAlignment="Stretch" HorizontalAlignment="Left" Background="Transparent"></basics:GridSplitter>
                        <!-- Display Area -->
                        <Border 
                          Grid.Row="3"
                          Grid.Column="1"
                          Grid.RowSpan="3"
                          Margin="1,0,5,5"
                          Padding="1,1,1,1"
                          BorderThickness="1"
                          BorderBrush="#FF885A2C"
                          CornerRadius="3,3,3,3" Opacity="1" Background="#FF885A2C">
                            <Grid x:Name="DisplayArea">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="5"/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <controls:Label Height="50" Padding="6,5,0,6" BorderBrush="#FF37210B" BorderThickness="1" x:Name="SampleHeader" Foreground="White" Background="#FF2D355C" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left" VerticalContentAlignment="Center" FontWeight="Bold" FontSize="16" />
                                <controls:Label Grid.Row="1" x:Name="SampleLevel" Height="18" Padding="10,0,10,0" Canvas.ZIndex="1" Content="Basic" Background="Green" Foreground="White" Margin="0,28,30,0" VerticalAlignment="Top"  HorizontalAlignment="Right"></controls:Label>
                                <basics:TabControl Grid.Row="1" x:Name="SamplesTab" Style="{StaticResource TabControlStyle}" >
                                </basics:TabControl>
                                <basics:GridSplitter Visibility="Visible" Height="5" ShowsPreview="True" x:Name="SampleGridSplitter" Background="#FF885A2C" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2"></basics:GridSplitter>
                                <Grid Grid.Row="3">
                                    <controls:Expander x:Name="SourceExpander" Margin="0,0,0,0" HorizontalAlignment="Stretch" Style="{StaticResource ExpanderStyle}" VerticalContentAlignment="Stretch" VerticalAlignment="Stretch" ExpandDirection="Down" IsExpanded="True">
                                        <controls:Expander.Header>
                                            <!-- List of source files to view -->
                                              <ListBox  Grid.Row="1" VerticalAlignment="Top"
                                              FontSize="10"
                                              x:Name="SourceList"
                                              Margin="0"
                                              Visibility="Visible"
                                              BorderThickness="0 0 0 1"
                                              ItemContainerStyle="{StaticResource ListBoxItemStyle}" Style="{StaticResource ListBoxStyle}">
                                                <ListBox.Resources>
                                                    <Storyboard x:Name="Show">
                                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="SourceList" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                                            <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </ListBox.Resources>
                                                <ListBox.ItemsPanel>
                                                    <ItemsPanelTemplate>
                                                        <StackPanel Orientation="Horizontal" />
                                                    </ItemsPanelTemplate>
                                                </ListBox.ItemsPanel>
                                                <ListBox.RenderTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform/>
                                                        <SkewTransform/>
                                                        <RotateTransform/>
                                                        <TranslateTransform/>
                                                    </TransformGroup>
                                                </ListBox.RenderTransform>
                                            </ListBox>
                                        </controls:Expander.Header>
                                        <!-- ScrollViewer containing the source code -->
                                        <ScrollViewer x:Name="SampleScroller" Style="{StaticResource ScrollViewerStyle}"
                                          HorizontalAlignment="Stretch"
                                          HorizontalScrollBarVisibility="Auto"
                                          VerticalScrollBarVisibility="Auto"
                                          VerticalContentAlignment="Stretch"
                                          VerticalAlignment="Stretch"
                                          BorderThickness="0">
                                          <!-- Source viewer -->
                                          <TextBox VerticalAlignment="Stretch"
                                          x:Name="SourceText"
                                          IsReadOnly="True"
                                          FontFamily="Courier New"
                                          HorizontalAlignment="Stretch"/>
                                        </ScrollViewer>
                                    </controls:Expander>
                                </Grid>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>